<?php

namespace JLPay\Models\Openmerch\Device;

use JLPay\Models\BaseRequest;

/**
 * 银联码查询请求
 */
class UnionPayCodeQueryRequest extends BaseRequest
{
    /**
     * API URL
     */
    public const API_URL = '/open/merch/access/device/unionpay/query';

    protected ?string $merchNo = null;

    /**
     * 设置商户号
     *
     * @param string $merchNo
     * @return self
     */
    public function setMerchNo(string $merchNo): self
    {
        $this->merchNo = $merchNo;
        return $this;
    }

    /**
     * 获取商户号
     *
     * @return string|null
     */
    public function getMerchNo(): ?string
    {
        return $this->merchNo;
    }

    /**
     * 转换为数组
     *
     * @return array
     */
    public function toArray(): array
    {
        $data = parent::toArray();
        $data['merch_no'] = $this->merchNo;
        return $data;
    }
} 